/****************************************
*  This file created using "Writer B"   *
*      a program written by CTonk       *
*          ctonk87@hotmail.com          *
*     [timestamp 02/20/06  12:50:06]    *
****************************************/

// Room.h

#ifndef H_ROOM
#define H_ROOM

#include "definitions.h"
#include <iostream>
#include <fstream>
#include <list>
#include "exit.h"

// I hate predefinitions...
class Area;
class Character;
class Mob;
class Object;

class Room
{
	private:
		int		_vnum;
		Area*	_area;
		int		_sector;
		int		_flags;
		char*	_name; // Array set with length 50
		char*	_descolor; // Array set with length 3
		std::string _desc;
		Exit*	_exit; // Array set with length 6
		bool	_noexit;
		std::list< Character* >		_cList;
		std::list< Mob* >			_mList;
		std::list< Object* >		_oList;

	public:
		// Constructors...
		Room();
		Room( Room& );
		~Room();

		// Operators...
		Room& operator = ( Room& );

		// Public accessor methods...
		int		GetVnum();
		void	SetVnum( int );
		Area*	getArea();
		void	setArea( Area* );
		int		GetSector();
		void	SetSector( int );
		int		getFlags();
		void	setFlags( int );
		char*	GetName( void );
		char	GetName( int );
		void	SetName( char* );
		void	SetName( const char* );
		void	SetName( int, char );
		std::string& getDesc();
		void	setDesc( std::string );
		char*	GetDescolor();
		Exit*	GetExit( void );
		Exit&	GetExit( int );
		void	SetExit( Exit& );
		std::list< Character* >&	GetClist();
		std::list< Mob*>&			getMlist();
		std::list< Object* >&		getOlist();

		// Other methods...
		void	Add( Character* );
		void	Remove( Character* );
		bool	There( Character* );
		Character* GetC( int );
		void	Add( Mob* );
		void	Remove( Mob* );
		bool	There( Mob* );
		Mob*	getM( int );
		void	Add( Object* );
		void	Remove( Object* );
		bool	There( Object* );
		Object* getO( int );
		void	SetNoexit( bool );
		bool	NoExits();
		void	Save( std::ofstream& );
		void	Load( std::ifstream& );

		// Randomness...
		static int numRooms;
		static const char* StringSector( int );
};


#endif // #ifndef H_ROOM
